<?php

namespace App\Models;

class Node extends Base
{

    public function setRoutenameAttribute($value)
    {
        $this->attributes['route_name'] = empty($value) ? '' : $value;
    }

    public  function getnodeAll()
    {
        $data =self::all();

        $tree = $this->treelevel($data);
//        dd($tree);
        return $tree;
    }


}
